﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Invoice.aspx.cs" Inherits="WMS6.Web.Billing.Invoice" meta:resourcekey="Page" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Statement</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />

    <script src="../Js/jquery.js" type="text/javascript"></script>

    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>

    <script src="../Js/util.js" id="js" type="text/javascript"></script>

    <script src="../Js/InitPage.js" type="text/javascript"></script>

    <script src="../Js/Verification.js" type="text/javascript"></script>

    <script src="../Js/checkbox.js" type="text/javascript"></script>

    <script src="../Js/calendar.js" type="text/javascript" charset="gb2312"></script>

    <script type="text/javascript">
        //初始化页面
        window.onload = function() {
            initEditNewPage();
        }
        //弹出窗口选择货主
        function selectStatement() {
            var rtnValue = popModalWindow('../Billing/StatementQuery.aspx?action=txtStatementID', 'dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if (rtnValue != null && rtnValue.toString() != "") {
                document.getElementById("txtStatementID").focus();
                document.getElementById("txtStatementID").value = rtnValue;
            }
        }
        function newInvoice() {
            var from = document.getElementById("hdnFrom").value;
            window.location.href = "Invoice.aspx?from=" + escape(from);
            return false;
        } 
    </script>

</head>
<body>
    <form id="F9211" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id="div_top">
            <table>
                <tr>
                    <td valign="bottom">
                        <asp:Label ID="lblOwner" runat="server" CssClass="label_header" Text="发票" 
                            meta:resourcekey="lblOwner"></asp:Label>
                    </td>
                    <td>
                        <asp:Button ID="btnGoBack" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnGoBack%>" Enabled="False"
                            OnClick="btnGoBack_Click"  />
                    </td>
                    <td>
                        <asp:Button ID="btnNew" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnNew%>"   Enabled="False"
                            AccessKey="n" OnClientClick="newInvoice(); return false;" 
                             />
                    </td>
                    <td>
                        <asp:Button ID="btnCreateInvoice" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnCreateInvoice%>"  Enabled="False"
                            AccessKey="n" OnClick="btnCreateInvoice_Click" 
                             />
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                </tr>
            </table>
        </div>
        <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
                <div>
                    <asp:Label ID="lblMsg" runat="server" CssClass="label_message" 
                        meta:resourcekey="lblMsg"></asp:Label>
                </div>
                <div id="div_menu">
                    <div style="float: left; width: 8px;">
                        <div class="tabL" id="divL1">
                        </div>
                    </div>
                    <div style="float: left;" class="tabLabelCont tabCur" onclick="setTab('one',1,2)"
                        id="divM1">
                        <asp:Label ID="one1" CssClass="hover" runat="server" 
                            meta:resourcekey="one1">基本信息</asp:Label></div>
                    <div style="float: left; margin-right: 2px;">
                        <div class="tabR" id="divR1">
                        </div>
                    </div>
                    
                    <div style="float: left; width: 8px;">
                        <div class="tabL_1" id="divL2">
                        </div>
                    </div>
                    <div style="float: left;" class="tabLabelCont tabCur_1" onclick="setTab('one',2,2);"
                        id="divM2">
                        <asp:Label ID="one2" CssClass="navigationlabel" runat="server" 
                            meta:resourcekey="one2">&nbsp;发票明细&nbsp;</asp:Label></div>
                    <div style="float: left; margin-right: 2px;">
                        <div class="tabR_1" id="divR2">
                        </div>
                    </div>
                </div>
                <div id="div_content">
                    <div id="con_one_1" style="display: block;">
                        <table width="720px" style="margin-left: 10px; margin-top: 10px;">
                            <tr>
                                <td width="180">
                                    <asp:Label ID="lblInvoiceID" runat="server" CssClass="label" Text="发票编号" 
                                        meta:resourcekey="lblInvoiceID"></asp:Label>
                                </td>
                                <td width="180">
                                    <asp:Label ID="lblStatementID" runat="server" CssClass="label" Text="对账单号" 
                                        meta:resourcekey="lblStatementID"></asp:Label><span
                                        class="must_input">*</span>
                                </td>
                                <td width="180">
                                </td>
                                <td width="180">
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtInvoiceID" runat="server" CssClass="textbox" MaxLength="20" 
                                        Enabled="False" meta:resourcekey="txtInvoiceID" ></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtStatementID" runat="server" CssClass="textbox" 
                                        meta:resourcekey="txtStatementID"></asp:TextBox><img
                                        src="../Images/icon_find.gif" id="imgStatementID" runat="server" alt="select one item"
                                        class="img" onclick="selectStatement();" />
                                </td>
                                <td>
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td width="180">
                                   <asp:Label ID="lblWhName" runat="server" CssClass="label" Text="仓库" 
                                        meta:resourcekey="lblWhName"></asp:Label>
                                </td>
                                <td width="180">
                                    <asp:Label ID="lblOnwerID" runat="server" CssClass="label" Text="货主" 
                                        meta:resourcekey="lblOnwerID"></asp:Label>
                                </td>
                                <td width="180">
                                </td>
                                <td width="180">
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td>
                                  <asp:TextBox ID="txtWhName" runat="server" CssClass="textbox" MaxLength="20" 
                                        Enabled="False" meta:resourcekey="txtWhName" ></asp:TextBox>
                                </td>
                                <td>
                                  <asp:TextBox ID="txtOwnerID" runat="server" CssClass="textbox" MaxLength="20" 
                                        Enabled="False" meta:resourcekey="txtOwnerID" ></asp:TextBox>
                                </td>
                                <td>
                                </td>
                                <td>
                                  
                                </td>
                            </tr>                        
                            <tr>
                                <td>
                                 <asp:Label ID="lblBillingDate" runat="server" CssClass="label" Text="开票日期" 
                                        meta:resourcekey="lblBillingDate"></asp:Label>
                                </td>
                                <td>
                                 <asp:Label ID="lblTotalAmount" runat="server" CssClass="label" Text="总金额" 
                                        meta:resourcekey="lblTotalAmount"></asp:Label>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtBillingDate" runat="server" CssClass="textbox" 
                                        MaxLength="20" Enabled="False" meta:resourcekey="txtBillingDate" ></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtTotalAmount" runat="server" CssClass="textbox" 
                                        MaxLength="20" Enabled="False" meta:resourcekey="txtTotalAmount" ></asp:TextBox>                               
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                  
                                </td>
                                <td>             
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div id="con_one_2" style="display: none;">
                        <table width="350px" style="margin-left: 10px; margin-top: 10px;">
                            <tr style="height: 10px;">
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div>
                                        <asp:GridView ID="gvInvoiceDetail" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                            CssClass="gridview" OnRowDataBound="gvInvoiceDetail_RowDataBound" DataKeyNames="LineID"
                                            AllowPaging="True" OnPageIndexChanging="gvInvoiceDetail_PageIndexChanging"
                                            OnSorting="gvInvoiceDetail_Sorting" 
                                            meta:resourcekey="gvInvoiceDetail">
                                            <FooterStyle CssClass="GridViewFooterStyle" />
                                            <RowStyle CssClass="GridViewRowStyle" />
                                            <HeaderStyle CssClass="GridViewHeaderStyle" />
                                            <PagerStyle CssClass="GridViewPageStyle" />
                                            <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                            <Columns>
                                                <asp:BoundField HeaderText="序号" FooterText="序号" 
                                                    meta:resourcekey="No">
                                                    <ItemStyle CssClass="GridViewRowWidth_40" />
                                                </asp:BoundField>                                              
                                                <asp:BoundField DataField="LineID" HeaderText="行号" FooterText="行号" 
                                                    SortExpression="LineID" meta:resourcekey="LineID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="RateType" HeaderText="费用类型" FooterText="费用类型" 
                                                    SortExpression="RateType" meta:resourcekey="RateType">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>             
                                                <asp:TemplateField FooterText="金额" HeaderText="金额" SortExpression="Amount" 
                                                    meta:resourcekey="Amount">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblAmount" runat="server" 
                                                            Text='<%# GetPreferenceDigit(Eval("Amount").ToString()) %>' 
                                                            meta:resourcekey="lblAmount"></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:TemplateField>                                             
                                            </Columns>
                                        </asp:GridView>
                                    </div>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr style="height:30px;">
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <input type="hidden" id="hdnFlag" runat="server" />            
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <input type="hidden" id="hdnFrom" runat="server" />
    </form>
</body>
</html>
